<ion-view class="settings" show-tabs>
  <ion-nav-bar class="bar-royal">
    <ion-nav-title>
      {{'Alternative Currency'|translate}}
    </ion-nav-title>
    <ion-nav-back-button>
    </ion-nav-back-button>
  </ion-nav-bar>
  <ion-content>
    <div class="bar bar-header item-input-inset m20b">
      <label class="item-input-wrapper">
        <i class="icon ion-ios-search placeholder-icon"></i>
        <input type="search" ng-init="searchedAltCurrency = ''" ng-model="searchedAltCurrency" ng-change="findCurrency(searchedAltCurrency)"
          placeholder="{{'Search your currency' | translate}}">
      </label>
    </div>
    <div class="list" ng-if="lastUsedAltCurrencyList[0]">
      <ion-radio class="alt-currency-radio" ng-repeat="lastUsedAltCurrency in lastUsedAltCurrencyList" ng-value="lastUsedAltCurrency.isoCode" ng-model="currentCurrency"
        ng-click="save(lastUsedAltCurrency)">{{lastUsedAltCurrency.name | translate}} <span class="item-note">{{lastUsedAltCurrency.isoCode}}</span>
      </ion-radio>
    </div>
    <div class="list">
      <div class="item" ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency"
        ng-click="save(altCurrency)">{{altCurrency.name | translate}} <span class="item-note">{{altCurrency.isoCode}}</span>
      </div>
    </div>
    <ion-infinite-scroll
     ng-if="!listComplete"
     on-infinite="loadMore()"
     distance="50%">
   </ion-infinite-scroll>
  </ion-content>
</ion-view>
